package cn.itcast.client;

import cn.itcast.client.fallback.UserClientFallbackFactory;
import cn.itcast.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author Xiao
 * @date 2021/10/15
 */
@FeignClient(value = "userservice", fallbackFactory = UserClientFallbackFactory.class)
//@FeignClient(value = "userservice", configuration = DefaultApplicationArguments.class)    //自定义日志级别
public interface UserClient {
    @GetMapping("/user/{id}")
    User findById(@PathVariable("id")Long id);
}
